from django.conf.urls import url

from . import views

urlpatterns = [
    url(r'^$', views.index,name='index'),
    #来配置访问的路径匹配 [0-9]匹配数字，+：一次 
    #需要用到正则的扩展表示法:由article_id标示的，来分组匹配。要跟函数里面的那个参数一致
    url(r'^article/(?P<article_id>[0-9]+)$', views.article_page,name='article_page'),

#设置内容是方便在html中提交时候找到对应位置
    url(r'^article/edit/(?P<article_id>[0-9]+)$', views.article_edit_page,name='article_edit_page'),

#定义一个地址来接收action提交的数据
    url(r'^article/edit/action/$', views.article_edit_page_action,name='article_edit_page_action'),

    # url(r'^login/$', views.login,name='login'),
]
